package com.yuxh.blog.controller;

import com.yuxh.blog.contact.BaseJsonResult;
import com.yuxh.blog.model.SomeSay;
import com.yuxh.blog.service.SomeSayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/someSay")
public class SomeSayController {
    @Autowired
    private SomeSayService someSayService;

    @RequestMapping("/list/{pageNumber}/{pageSize}")
    public BaseJsonResult list(@PathVariable Integer pageNumber, @PathVariable Integer pageSize) {
        Page<SomeSay> page = someSayService.list(pageNumber,pageSize);
        return BaseJsonResult.success("page", page);
    }

}
